Skip to content

chat: bump @ably/chat to 0.10.0#55

Merged
AndyTWF merged 1 commit into
mainfrom
chat-js-0-10-bump
Jul 10, 2025
Merged

chat: bump @ably/chat to 0.10.0#55
AndyTWF merged 1 commit into
mainfrom
chat-js-0-10-bump

Conversation

@AndyTWF

@AndyTWF AndyTWF commented Jul 9, 2025

Copy link
Copy Markdown
Contributor

Bumps chat-js to 0.10.0.

Summary by CodeRabbit

  • Bug Fixes

    • Improved message retrieval, reaction handling, and presence event processing for chat rooms to enhance reliability and consistency.
    • Updated event and property names for reactions and presence events to align with the latest chat library updates.
    • Enhanced type safety and event handling for message and occupancy subscriptions.
    • Fixed minor logging and output formatting issues for clarity during real-time updates.
  • Chores

    • Upgraded the "@ably/chat" dependency to a newer version for improved compatibility and features.

@vercel

vercel Bot commented Jul 9, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cli-web-cli ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 9, 2025 10:30am

@coderabbitai

coderabbitai Bot commented Jul 9, 2025

Copy link
Copy Markdown

Walkthrough

This update upgrades the "@ably/chat" dependency from "^0.7.0" to "^0.10.0" and revises various CLI command files to align with breaking changes in the library. Updates include method renaming, type adjustments, property renaming, and event structure changes across message, reaction, presence, and occupancy command handlers.

Changes

File(s) Change Summary
package.json Upgraded "@ably/chat" dependency from "^0.7.0" to "^0.10.0".
src/commands/rooms/messages/get.ts Changed message history retrieval method from get to history.
src/commands/rooms/messages/reactions/add.ts Changed reaction method from add to send on room.messages.reactions.
src/commands/rooms/messages/subscribe.ts Replaced MessageEvent type with ChatMessageEvent and updated callback typings.
src/commands/rooms/occupancy/get.ts Replaced OccupancyEvent with OccupancyData and updated identifier usage for room release.
src/commands/rooms/occupancy/subscribe.ts Refactored import style and updated callback to extract occupancy metrics from event object.
src/commands/rooms/presence/enter.ts
src/commands/rooms/presence/subscribe.ts
Updated presence event handling to use PresenceEvent, PresenceEventType, and nested member objects.
src/commands/rooms/reactions/send.ts Changed reaction property from type to name in room.reactions.send call.
src/commands/rooms/reactions/subscribe.ts Updated to use RoomReactionEvent, extract reaction from event, and use name instead of type.

Sequence Diagram(s)

sequenceDiagram
    participant CLI_User
    participant CLI_Command
    participant AblyChatSDK

    CLI_User->>CLI_Command: Run command (e.g., subscribe, send reaction)
    CLI_Command->>AblyChatSDK: Call updated method (e.g., history, send, subscribe)
    AblyChatSDK-->>CLI_Command: Emit event or response (with new types/structure)
    CLI_Command-->>CLI_User: Output formatted result using updated properties/types
Loading

Possibly related PRs

Suggested reviewers

  • splindsay-92

Poem

In the warren of code, a new chat breeze blows,
Methods renamed, types in neat rows.
Reactions now "send", and messages "history" told,
Presence and occupancy, structured and bold.
With every hop, this rabbit delights—
Upgraded chat magic, on CLI nights!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dd1a345 and c06a714.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (10)
  • package.json (1 hunks)
  • src/commands/rooms/messages/get.ts (1 hunks)
  • src/commands/rooms/messages/reactions/add.ts (1 hunks)
  • src/commands/rooms/messages/subscribe.ts (3 hunks)
  • src/commands/rooms/occupancy/get.ts (3 hunks)
  • src/commands/rooms/occupancy/subscribe.ts (2 hunks)
  • src/commands/rooms/presence/enter.ts (2 hunks)
  • src/commands/rooms/presence/subscribe.ts (3 hunks)
  • src/commands/rooms/reactions/send.ts (1 hunks)
  • src/commands/rooms/reactions/subscribe.ts (3 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
`src/commands/**/*.ts`: Commands should follow the oclif structure: export defau...

src/commands/**/*.ts: Commands should follow the oclif structure: export default class MyCommand extends Command { ... }
Command should support auth via the standard auth helper: import { getAuth } from '../../helpers/auth' and use it in the run method.
Handle errors using try/catch and provide user-friendly error messages, especially for authentication failures (e.g., error.code === 40100).
Do not use direct HTTP requests (e.g., fetch) for data plane APIs; use the Ably SDK instead.
Do not use inconsistent command structures (e.g., classes not extending Command or missing standard methods).
Do not hardcode endpoint URLs; use configuration values (e.g., flags.controlHost, config.controlHost).

📄 Source: CodeRabbit Inference Engine (.cursor/rules/AI-Assistance.mdc)

List of files the instruction was applied to:

  • src/commands/rooms/reactions/send.ts
  • src/commands/rooms/messages/get.ts
  • src/commands/rooms/reactions/subscribe.ts
  • src/commands/rooms/occupancy/subscribe.ts
  • src/commands/rooms/messages/reactions/add.ts
  • src/commands/rooms/presence/subscribe.ts
  • src/commands/rooms/presence/enter.ts
  • src/commands/rooms/messages/subscribe.ts
  • src/commands/rooms/occupancy/get.ts
`**/*.{ts,tsx}`: Use TypeScript and follow best practice naming conventions Ensure all code passes ESLint lint checks before concluding your work

**/*.{ts,tsx}: Use TypeScript and follow best practice naming conventions
Ensure all code passes ESLint lint checks before concluding your work

📄 Source: CodeRabbit Inference Engine (.cursor/rules/Development.mdc)

List of files the instruction was applied to:

  • src/commands/rooms/reactions/send.ts
  • src/commands/rooms/messages/get.ts
  • src/commands/rooms/reactions/subscribe.ts
  • src/commands/rooms/occupancy/subscribe.ts
  • src/commands/rooms/messages/reactions/add.ts
  • src/commands/rooms/presence/subscribe.ts
  • src/commands/rooms/presence/enter.ts
  • src/commands/rooms/messages/subscribe.ts
  • src/commands/rooms/occupancy/get.ts
`src/commands/**/*.{ts,js}`: Follow oclif framework best practices when working with the CLI

src/commands/**/*.{ts,js}: Follow oclif framework best practices when working with the CLI

📄 Source: CodeRabbit Inference Engine (.cursor/rules/Development.mdc)

List of files the instruction was applied to:

  • src/commands/rooms/reactions/send.ts
  • src/commands/rooms/messages/get.ts
  • src/commands/rooms/reactions/subscribe.ts
  • src/commands/rooms/occupancy/subscribe.ts
  • src/commands/rooms/messages/reactions/add.ts
  • src/commands/rooms/presence/subscribe.ts
  • src/commands/rooms/presence/enter.ts
  • src/commands/rooms/messages/subscribe.ts
  • src/commands/rooms/occupancy/get.ts
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: When the Ably API reference mentions SDK version 2.0, use https://ably.com/docs/sdk/js/v2.0/ for the most up-to-date information.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:42.655Z
Learning: When in doubt about how Ably works, refer to the Ably docs online at https://ably.com/docs to provide idiomatic suggestions in the CLI.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: When in doubt about how Ably works, refer to the Ably docs online at https://ably.com/docs to provide idiomatic suggestions in the CLI.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:42.655Z
Learning: When the Ably API reference mentions using https://ably.com/docs/sdk/js/v2.0/, prefer this version for the JavaScript SDK documentation.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/AI-Assistance.mdc:0-0
Timestamp: 2025-07-07T21:06:34.712Z
Learning: Applies to src/commands/**/*.ts : Do not use direct HTTP requests (e.g., fetch) for data plane APIs; use the Ably SDK instead.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:42.655Z
Learning: The CLI must always use the relevant product Ably SDKs for all data plane commands.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: The CLI must always use the relevant product Ably SDKs for all data plane commands.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: Pay attention to the following Ably documentation: Pub/Sub guides and API references, Chat guides and API references, Spaces guides and API references, Control API docs and references, and broader platform docs.
package.json (6)
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Development.mdc:0-0
Timestamp: 2025-07-07T21:07:00.723Z
Learning: Applies to package.json : Avoid unnecessary dependencies; keep dependencies to a pragmatic minimum.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: When the Ably API reference mentions SDK version 2.0, use https://ably.com/docs/sdk/js/v2.0/ for the most up-to-date information.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/AI-Assistance.mdc:0-0
Timestamp: 2025-07-07T21:06:34.712Z
Learning: Applies to src/**/*.@(test|spec).ts : Mock the Ably SDK properly in tests, including stubbing the constructor and cleaning up with sinon.restore().
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/AI-Assistance.mdc:0-0
Timestamp: 2025-07-07T21:06:34.712Z
Learning: Applies to src/commands/**/*.ts : Do not use direct HTTP requests (e.g., fetch) for data plane APIs; use the Ably SDK instead.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: Pay attention to the following Ably documentation: Pub/Sub guides and API references, Chat guides and API references, Spaces guides and API references, Control API docs and references, and broader platform docs.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:42.655Z
Learning: Pay attention to the following Ably documentation sources: Pub/Sub guides and API references, Chat guides and API references, Spaces guides and API references, Control API docs and references, and broader platform docs.
src/commands/rooms/reactions/subscribe.ts (10)
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/AI-Assistance.mdc:0-0
Timestamp: 2025-07-07T21:06:34.712Z
Learning: Applies to src/commands/**/*.ts : Do not use direct HTTP requests (e.g., fetch) for data plane APIs; use the Ably SDK instead.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: Pay attention to the following Ably documentation: Pub/Sub guides and API references, Chat guides and API references, Spaces guides and API references, Control API docs and references, and broader platform docs.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:42.655Z
Learning: Pay attention to the following Ably documentation sources: Pub/Sub guides and API references, Chat guides and API references, Spaces guides and API references, Control API docs and references, and broader platform docs.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:42.655Z
Learning: When in doubt about how Ably works, refer to the Ably docs online at https://ably.com/docs to provide idiomatic suggestions in the CLI.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: When in doubt about how Ably works, refer to the Ably docs online at https://ably.com/docs to provide idiomatic suggestions in the CLI.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/AI-Assistance.mdc:0-0
Timestamp: 2025-07-07T21:06:34.712Z
Learning: Do not suggest features outside the scope of Ably services for the CLI.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: The CLI must always use the relevant product Ably SDKs for all data plane commands.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:42.655Z
Learning: The CLI must always use the relevant product Ably SDKs for all data plane commands.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: When the Ably API reference mentions SDK version 2.0, use https://ably.com/docs/sdk/js/v2.0/ for the most up-to-date information.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:42.655Z
Learning: When the Ably API reference mentions using https://ably.com/docs/sdk/js/v2.0/, prefer this version for the JavaScript SDK documentation.
src/commands/rooms/occupancy/subscribe.ts (10)
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: Pay attention to the following Ably documentation: Pub/Sub guides and API references, Chat guides and API references, Spaces guides and API references, Control API docs and references, and broader platform docs.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:42.655Z
Learning: Pay attention to the following Ably documentation sources: Pub/Sub guides and API references, Chat guides and API references, Spaces guides and API references, Control API docs and references, and broader platform docs.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/AI-Assistance.mdc:0-0
Timestamp: 2025-07-07T21:06:34.712Z
Learning: Applies to src/commands/**/*.ts : Do not use direct HTTP requests (e.g., fetch) for data plane APIs; use the Ably SDK instead.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:42.655Z
Learning: When in doubt about how Ably works, refer to the Ably docs online at https://ably.com/docs to provide idiomatic suggestions in the CLI.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: When in doubt about how Ably works, refer to the Ably docs online at https://ably.com/docs to provide idiomatic suggestions in the CLI.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: When the Ably API reference mentions SDK version 2.0, use https://ably.com/docs/sdk/js/v2.0/ for the most up-to-date information.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/AI-Assistance.mdc:0-0
Timestamp: 2025-07-07T21:06:34.712Z
Learning: Do not suggest features outside the scope of Ably services for the CLI.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: The CLI must always use the relevant product Ably SDKs for all data plane commands.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:42.655Z
Learning: The CLI must always use the relevant product Ably SDKs for all data plane commands.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:42.655Z
Learning: When the Ably API reference mentions using https://ably.com/docs/sdk/js/v2.0/, prefer this version for the JavaScript SDK documentation.
src/commands/rooms/presence/subscribe.ts (3)
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: Pay attention to the following Ably documentation: Pub/Sub guides and API references, Chat guides and API references, Spaces guides and API references, Control API docs and references, and broader platform docs.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:42.655Z
Learning: Pay attention to the following Ably documentation sources: Pub/Sub guides and API references, Chat guides and API references, Spaces guides and API references, Control API docs and references, and broader platform docs.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/AI-Assistance.mdc:0-0
Timestamp: 2025-07-07T21:06:34.712Z
Learning: Applies to src/**/*.@(test|spec).ts : Always ensure resources are properly closed/cleaned up in tests, such as calling client.close() and sinon.restore() in afterEach.
src/commands/rooms/presence/enter.ts (10)
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/AI-Assistance.mdc:0-0
Timestamp: 2025-07-07T21:06:34.712Z
Learning: Applies to src/commands/**/*.ts : Do not use direct HTTP requests (e.g., fetch) for data plane APIs; use the Ably SDK instead.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: Pay attention to the following Ably documentation: Pub/Sub guides and API references, Chat guides and API references, Spaces guides and API references, Control API docs and references, and broader platform docs.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:42.655Z
Learning: Pay attention to the following Ably documentation sources: Pub/Sub guides and API references, Chat guides and API references, Spaces guides and API references, Control API docs and references, and broader platform docs.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:42.655Z
Learning: When in doubt about how Ably works, refer to the Ably docs online at https://ably.com/docs to provide idiomatic suggestions in the CLI.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: When in doubt about how Ably works, refer to the Ably docs online at https://ably.com/docs to provide idiomatic suggestions in the CLI.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: The CLI must always use the relevant product Ably SDKs for all data plane commands.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:42.655Z
Learning: The CLI must always use the relevant product Ably SDKs for all data plane commands.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: When the Ably API reference mentions SDK version 2.0, use https://ably.com/docs/sdk/js/v2.0/ for the most up-to-date information.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/AI-Assistance.mdc:0-0
Timestamp: 2025-07-07T21:06:34.712Z
Learning: Do not suggest features outside the scope of Ably services for the CLI.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:42.655Z
Learning: When the Ably API reference mentions using https://ably.com/docs/sdk/js/v2.0/, prefer this version for the JavaScript SDK documentation.
src/commands/rooms/messages/subscribe.ts (10)
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/AI-Assistance.mdc:0-0
Timestamp: 2025-07-07T21:06:34.712Z
Learning: Applies to src/commands/**/*.ts : Do not use direct HTTP requests (e.g., fetch) for data plane APIs; use the Ably SDK instead.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:42.655Z
Learning: When in doubt about how Ably works, refer to the Ably docs online at https://ably.com/docs to provide idiomatic suggestions in the CLI.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: When in doubt about how Ably works, refer to the Ably docs online at https://ably.com/docs to provide idiomatic suggestions in the CLI.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: The CLI must always use the relevant product Ably SDKs for all data plane commands.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:42.655Z
Learning: The CLI must always use the relevant product Ably SDKs for all data plane commands.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:41.172Z
Learning: Pay attention to the following Ably documentation: Pub/Sub guides and API references, Chat guides and API references, Spaces guides and API references, Control API docs and references, and broader platform docs.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/AI-Assistance.mdc:0-0
Timestamp: 2025-07-07T21:06:34.712Z
Learning: Do not suggest features outside the scope of Ably services for the CLI.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Development.mdc:0-0
Timestamp: 2025-07-07T21:07:04.749Z
Learning: Applies to src/commands/**/*.{ts,js} : Follow oclif framework best practices when working with the CLI
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/Ably.mdc:0-0
Timestamp: 2025-07-07T21:06:42.655Z
Learning: Pay attention to the following Ably documentation sources: Pub/Sub guides and API references, Chat guides and API references, Spaces guides and API references, Control API docs and references, and broader platform docs.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/AI-Assistance.mdc:0-0
Timestamp: 2025-07-07T21:06:34.712Z
Learning: Applies to src/commands/**/*.ts : Commands should follow the oclif structure: export default class MyCommand extends Command { ... }
src/commands/rooms/occupancy/get.ts (2)
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/AI-Assistance.mdc:0-0
Timestamp: 2025-07-07T21:06:34.712Z
Learning: Applies to src/commands/**/*.ts : Do not use direct HTTP requests (e.g., fetch) for data plane APIs; use the Ably SDK instead.
Learnt from: CR
PR: ably/cli#0
File: .cursor/rules/AI-Assistance.mdc:0-0
Timestamp: 2025-07-07T21:06:34.712Z
Learning: Applies to src/commands/**/*.ts : Commands should follow the oclif structure: export default class MyCommand extends Command { ... }
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: e2e-cli
  • GitHub Check: e2e-web-cli
🔇 Additional comments (24)
package.json (1)

84-84: @ably/chat v0.10.0 verification & audit required

  • Confirmed that 0.10.0 is published on npm.
  • No advisories surfaced, but npm audit requires a lockfile to report vulnerabilities.
  • Please generate/update your lockfile (e.g. npm install --package-lock-only) and run npm audit to catch any issues.
  • Review the Ably changelog for breaking changes introduced between 0.7.0 → 0.10.0.
src/commands/rooms/messages/reactions/add.ts (1)

239-239: LGTM: API method updated correctly.

The method name change from add to send is consistent with the @ably/chat 0.10.0 API update. The parameters and functionality remain unchanged.

src/commands/rooms/reactions/send.ts (1)

206-206: LGTM: Property name updated correctly.

The property name change from type to name is consistent with the @ably/chat 0.10.0 API update. The value assignment and functionality remain unchanged.

src/commands/rooms/messages/get.ts (1)

83-83: LGTM: API method updated correctly.

The method name change from get to history is consistent with the @ably/chat 0.10.0 API update. The parameters and functionality remain unchanged.

src/commands/rooms/occupancy/subscribe.ts (2)

1-7: LGTM: Import statement formatting improved.

The multi-line import formatting enhances readability without changing functionality.


269-270: LGTM: Event structure updated correctly.

The parameter name change from occupancyMetrics to occupancyEvent and the extraction of occupancyMetrics from occupancyEvent.occupancy correctly adapts to the new event structure in @ably/chat 0.10.0. The functionality remains unchanged.

src/commands/rooms/reactions/subscribe.ts (4)

1-1: LGTM! Import updated for new event structure.

The addition of RoomReactionEvent import aligns with the @ably/chat package upgrade and the new event handling pattern.


189-190: LGTM! Correctly updated event handling structure.

The callback now properly receives a RoomReactionEvent and extracts the reaction from the event object, which is consistent with the new @ably/chat API design.


197-197: LGTM! Property name updated from type to name.

The change from reaction.type to reaction.name correctly reflects the property renaming in the new @ably/chat version.


213-213: LGTM! Console output updated to use new property name.

The console output correctly uses reaction.name instead of reaction.type, maintaining consistency with the API changes.

src/commands/rooms/occupancy/get.ts (3)

3-3: LGTM! Type import updated for new @ably/chat version.

The change from OccupancyEvent to OccupancyData reflects the type renaming in the upgraded package version.


120-122: LGTM! Promise type and timeout message updated.

The type annotation correctly uses OccupancyData and the timeout message formatting has been standardized.


48-48: All references to .room.roomId have been updated to .name.
No remaining occurrences of this.room.roomId were found across the codebase—only this.room.name in src/commands/rooms/occupancy/get.ts. No further changes are required.

src/commands/rooms/messages/subscribe.ts (3)

3-3: LGTM! Import updated to use specific chat message event type.

The change from MessageEvent to ChatMessageEvent provides better type specificity for chat-related message events.


32-32: LGTM! Interface method signature updated with new event type.

The callback parameter type correctly uses ChatMessageEvent instead of the generic MessageEvent, maintaining type consistency.


194-194: LGTM! Callback parameter type updated consistently.

The message event callback parameter is correctly typed as ChatMessageEvent, maintaining consistency with the interface definition and import changes.

src/commands/rooms/presence/subscribe.ts (4)

9-10: LGTM! Import updated with new presence event types.

The addition of PresenceEvent and PresenceEventType provides better type safety and structure for presence event handling.


181-183: LGTM! Event handling updated to use structured member object.

The code now correctly extracts the member from the event and uses event.type instead of the deprecated event.action. This provides better structure and type safety.


188-191: LGTM! Event type handling updated to use enum values.

The code now uses PresenceEventType enum values (Enter, Leave, Update) instead of string literals, providing better type safety and reducing the risk of typos.


192-195: LGTM! Member data access updated to use structured approach.

The code correctly accesses client ID and data from the member object instead of directly from the event, aligning with the new structured API design.

src/commands/rooms/presence/enter.ts (4)

1-1: LGTM! Import updated with new presence event types.

The addition of PresenceEvent and PresenceEventType to the imports provides better type safety and structure for presence event handling, consistent with the changes in other presence files.


145-150: LGTM! Event handling updated to use structured member object.

The callback parameter is now correctly typed as PresenceEvent, and the code properly extracts the member from the event while using event.type instead of the deprecated event.action. This maintains consistency with the updated API design.


155-158: LGTM! Event type handling updated to use enum values.

The code now uses PresenceEventType enum values (Enter, Leave, Update) instead of string literals, providing better type safety and consistency with the changes in other presence files.


159-162: LGTM! Member data access updated to use structured approach.

The code correctly accesses client ID and data from the member object instead of directly from the event, aligning with the new structured API design and maintaining consistency across presence-related commands.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chat-js-0-10-bump

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@mattheworiordan mattheworiordan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @AndyTWF. We have some erratic CI issues right now since the migration to the interactive REPL for the web version which I will be pushing a fix for. Looking at the failures, it appears that the failures are only related to that issue, #52. I am happy for you to merge

@AndyTWF AndyTWF merged commit fde50d0 into main Jul 10, 2025
4 of 6 checks passed
This was referenced Jul 24, 2025
@AndyTWF AndyTWF deleted the chat-js-0-10-bump branch March 23, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants